package com.example.javabasic.shejimoshi.qiaojie.demo1;
//桥接模式
public class Test {
    public static void main(String[] args) {

        //实现化角色
        Implementor implementor = new ConcreteImplementorA();
        //抽象化角色  扩展抽象化角色
        Abstraction refinedAbstraction = new RefinedAbstraction(implementor);
        //操作抽象化角色的 operation 方法
        refinedAbstraction.operation();

        //实现化角色B
        Implementor implementor1 = new ConcreteImplementorB();
        Abstraction abstraction = new RefinedAbstraction(implementor1);
        abstraction.operation();
    }
}

